<?php

class Control_Newsleft extends QUI_Control_Abstract
{
    function render()
    {
		//师资库
		$this->_view['teacher_list'] = Teacher::find()->order('CONVERT(tea_name USING gbk)')->top(6)->getAll();
		//学员好评
		$this->_view['opinion_list'] = Opinion::find()->order('post_date desc')->top(6)->getAll();
		//考试指南
		$kszn = newstype::find("isdelete = 0 and pid = '12'")->order('taxis desc,id asc')->top(12)->asArray()->getAll();
		$this->_view['kszn_1'] = array_slice($kszn,0,3);
		$this->_view['kszn_2'] = array_slice($kszn,3,3);
		$this->_view['kszn_3'] = array_slice($kszn,6,3);
		$this->_view['kszn_4'] = array_slice($kszn,9,3);
        $out = $this->_fetchView(dirname(__FILE__) . '/newsleft_view');

        return $out;
    }

}
